function addWebProxy(tab, proxy_url) {
    if (proxy_url) {
        var u = parseUri(tab.url);

		if (u['host'].match(proxy_url+'$') != proxy_url) {
			var newURL = u['protocol'] + '://' + u['host'] + '.' + proxy_url + u['relative'];
			
			chrome.tabs.update(tab.id, {
				url: newURL
			});
		}
    }
}

